Optimal. Leaf size=48 \[ \frac{a^3 \sin (c+d x)}{d}+\frac{a^3 \tan (c+d x)}{d}+\frac{3 a^3 \tanh ^{-1}(\sin (c+d x))}{d}+3 a^3 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0669439, antiderivative size = 48, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {2757, 2637, 3770, 3767, 8} \[ \frac{a^3 \sin (c+d x)}{d}+\frac{a^3 \tan (c+d x)}{d}+\frac{3 a^3 \tanh ^{-1}(\sin (c+d x))}{d}+3 a^3 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2757
Rule 2637
Rule 3770
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int (a+a \cos (c+d x))^3 \sec ^2(c+d x) \, dx &=\int \left (3 a^3+a^3 \cos (c+d x)+3 a^3 \sec (c+d x)+a^3 \sec ^2(c+d x)\right ) \, dx\\ &=3 a^3 x+a^3 \int \cos (c+d x) \, dx+a^3 \int \sec ^2(c+d x) \, dx+\left (3 a^3\right ) \int \sec (c+d x) \, dx\\ &=3 a^3 x+\frac{3 a^3 \tanh ^{-1}(\sin (c+d x))}{d}+\frac{a^3 \sin (c+d x)}{d}-\frac{a^3 \operatorname{Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}\\ &=3 a^3 x+\frac{3 a^3 \tanh ^{-1}(\sin (c+d x))}{d}+\frac{a^3 \sin (c+d x)}{d}+\frac{a^3 \tan (c+d x)}{d}\\ \end{align*}
Mathematica [B] time = 0.681315, size = 211, normalized size = 4.4 \[ \frac{1}{8} a^3 (\cos (c+d x)+1)^3 \sec ^6\left (\frac{1}{2} (c+d x)\right ) \left (\frac{\sin (c) \cos (d x)}{d}+\frac{\cos (c) \sin (d x)}{d}+\frac{\sin \left (\frac{d x}{2}\right )}{d \left (\cos \left (\frac{c}{2}\right )-\sin \left (\frac{c}{2}\right )\right ) \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )}+\frac{\sin \left (\frac{d x}{2}\right )}{d \left (\sin \left (\frac{c}{2}\right )+\cos \left (\frac{c}{2}\right )\right ) \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )}-\frac{3 \log \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )}{d}+\frac{3 \log \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )}{d}+3 x\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.077, size = 65, normalized size = 1.4 \begin{align*} 3\,{a}^{3}x+{\frac{{a}^{3}\sin \left ( dx+c \right ) }{d}}+3\,{\frac{{a}^{3}\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}+{\frac{{a}^{3}\tan \left ( dx+c \right ) }{d}}+3\,{\frac{{a}^{3}c}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.07648, size = 86, normalized size = 1.79 \begin{align*} \frac{6 \,{\left (d x + c\right )} a^{3} + 3 \, a^{3}{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, a^{3} \sin \left (d x + c\right ) + 2 \, a^{3} \tan \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.76439, size = 238, normalized size = 4.96 \begin{align*} \frac{6 \, a^{3} d x \cos \left (d x + c\right ) + 3 \, a^{3} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, a^{3} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \,{\left (a^{3} \cos \left (d x + c\right ) + a^{3}\right )} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.48311, size = 108, normalized size = 2.25 \begin{align*} \frac{3 \,{\left (d x + c\right )} a^{3} + 3 \, a^{3} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, a^{3} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) - \frac{4 \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 1}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]